#!/bin/bash
#=======================
# Author : Ali Moradzade
# Created: 2022/01/12
#=======================

# trying to access script parameters inside a function

function badfunc1 {
	echo $[ $1 * $2 ]
}

if [ $# -eq 2 ]
then
	value=$(badfunc1)
	echo "The result is $value"
else
	echo "Usage: $(basename $0) a b"
fi
